User Type
Dealing With UserType
In order to deal with the User and the functionality related to User, we use the interface UserType
interface UserType {
id?: number;
name?: string;
phone_number?: string;
email?: string;
date_of_birth?: string;
gender?: GenderType;
insurance_id?: string;
policy_number?: string;
nationality_number?: string;
height?: string;
weight?: string;
blood_type?: BloodType;
smoker?: BoolString;
alcoholic?: BoolString;
marital_status?: MaritalStatus;
created_at?: string;
updated_at?: string;
}
User Functionalities
The following are the functions related to user management:
API | Params |
---|---|
createUser | userData: UserType |
updateUser | user: UserType, user_id: String |
getUser | user_id: String (required) |
getUsers | page: number, perPage: number |
deleteUser | user_id: String |